<template>
  <div class="submodule">
    <div class="submodule-centent">
      <div style="font-size: 18px; color: #2e5c9a; padding: 20px">政策文件</div>
      <HyTable :tableItems="tableItems" :tableData="tableData">
        <template #operation>
          <el-button type="text" size="small"> 详情 </el-button>
        </template>
      </HyTable>
    </div>
    <el-pagination background layout="prev, pager, next" :total="1000">
    </el-pagination>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { HyTable, ITableItem } from '@/base-ui/table/index'

export default defineComponent({
  components: { HyTable },
  setup() {
    let tableData = [
      {
        time: '2016-05-02',
        title: '解读丨中华人民共和国海关报关单位备案管理规定',
      },
      {
        time: '2016-05-04',
        title: '解读丨中华人民共和国海关报关单位备案管理规定',
      },
      {
        time: '2016-05-01',
        title: '解读丨中华人民共和国海关报关单位备案管理规定',
      },
      {
        time: '2016-05-03',
        title: '解读丨中华人民共和国海关报关单位备案管理规定',
      },
    ]
    const tableItems: ITableItem[] = [
      {
        prop: 'title',
        label: '标题',
        minWidth: 180,
      },
      {
        prop: 'time',
        label: '时间',
        minWidth: 100,
      },
      {
        prop: 'operation',
        label: '操作',
        minWidth: 180,
        slotName: 'operation',
      },
    ]
    return { tableData, tableItems }
  },
})
</script>

<style scoped lang="less">
.submodule {
  width: 965px;

  min-height: 500px;
  background: #ffffff;
  .submodule-centent {
    min-height: 500px;
  }
}
</style>
